package com.github.ecbp.user.service.service;

import com.github.ecbp.common.data.service.BaseService;
import com.github.ecbp.common.req.BaseIdListDTO;
import com.github.ecbp.common.req.SimpleIdListStatusParam;
import com.github.ecbp.user.service.dto.AdminRolesDto;
import com.github.ecbp.user.service.entity.TAdmin;
import com.github.ecbp.user.service.request.AdminReq;
import com.github.ecbp.user.service.request.FindAdminPasswordReq;

import java.util.Set;

/**
 * <p>
 * 后台用户表 服务类
 * </p>
 *
 * @author zj2626
 * @since 2020-03-18
 */
public interface AdminSaveService extends BaseService<TAdmin> {
    boolean registerUser(AdminReq param);

    int updateStatusById(SimpleIdListStatusParam param);

    /**
     * 给用户分配角色
     *
     * @param param
     * @return int
     * @author zj2626
     * @date 2020/5/12
     */
    Set<Long> updateRole(AdminRolesDto param);

    /**
     * 重置密码
     *
     * @param param
     * @return int
     * @author zj2626
     * @date 2020/5/12
     */
    int resetPassword(BaseIdListDTO param);

    Integer findPassword(FindAdminPasswordReq param);

    Integer findPassword(FindAdminPasswordReq param, Long id);
}
